package com.linkgie.galaxyframework.httpproxy.core;

import java.util.Properties;
import java.util.Set;

import com.linkgie.galaxyframework.httpproxy.NameValues;

class PropertyNameValues implements NameValues {

    private Properties properties;

    public PropertyNameValues() {
        this.properties = new Properties();
    }

    public PropertyNameValues(Properties properties) {
        this.properties = properties == null ? new Properties() : properties;
    }

    @Override
    public Set<String> getNames() {
        return properties.stringPropertyNames();
    }

    @Override
    public String getValue(String name) {
        return properties.getProperty(name);
    }

    Properties getProperties(){
        return properties;
    }

}
